#!/usr/bin/env python3
# -*- coding: utf-8 -*-

def rabbits(months):
    # days: 天数
    # return：兔子只数
    if months < 1:
        print('您输入的月数有误！')
        return 0
    else:
        if months < 3:
            return 1
        else:
            return rabbits(months - 1) + rabbits(months - 2)

def main():
    for i in range(1, 41):
        print('第%d个月的兔子总数是%d'%(i, rabbits(i)))

if __name__ == '__main__':
    main()